// @ts-ignore

/* eslint-disable */
import { request } from 'umi';


/** 获取当前用户信息 POST /doa/user/current，就是上传用户的doi信息就可以了*/

export async function currentUser(params,options) {
  return request('/doa/user/currentUser', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {...params},
    ...(options || {}),
  });
}

/** 退出登录接口 POST /doa/user/logout */

export async function outLogin(options) {
  return request('/doa/user/logout', {
    method: 'POST',
    ...(options || {}),
  });
}
/** 登录接口 POST /doa/user/login */

export async function login(body, options) {
  return request('/doa/user/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 注册接口 POST /doa/user/register */

export async function register(body, options) {
  return request('/doa/user/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 授权 POST /doa/user/grant */

export async function grant(body, options) {
  return request('/doa/user/grant', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
